/**
 * Created by Administrator on 2017/3/21.
 */
import React, {Component} from 'react';
import {
  Form, Input, Radio, Select, Icon,
  Upload, Descriptions, DatePicker, TreeSelect,
} from 'antd';
import {connect} from 'dva';
import find from 'lodash/find'
import request from '@/utils/request';
const FormItem = Form.Item;
const { TextArea } = Input;
const TreeNode = TreeSelect.TreeNode;
const RadioGroup = Radio.Group;
const Option = Select.Option;
class AddPoliciesForm extends Component {
  constructor(props) {
    super(props);
    this.state = {
    };
  }

  componentDidMount() {
  }
  render() {
    const formItemLayoutWithLabel = {
      labelCol: {
        xs: {span: 24},
        sm: {span: 7},
      },
      wrapperCol: {
        xs: {span: 24},
        sm: {span: 16},
      }
    };

    const {getFieldDecorator} = this.props.form;
    return (
      <div>
        <Form>
          {
            this.props.type==='meter'&&
            <FormItem
              {...formItemLayoutWithLabel}
              label={(
                <span>
              用水量异常报警值
            </span>
              )}>
              {getFieldDecorator('consumption_abnormality_value', {
                initialValue: this.props.editRecord.consumption_abnormality_value,
                rules: [{required: true, message:''}],
              })(
                <Input/>
              )}
            </FormItem>

          }


        </Form>
      </div>
    );
  }
}

const AddPoliciesFormWrap = Form.create()(AddPoliciesForm);
export default connect()(AddPoliciesFormWrap);
